const isRelease = process.env.NODE_ENV === 'production';
//const isRelease = false;
console.log('isRelease:',isRelease);
/**Web 服务端口 */
const serverPort = isRelease ? 7004 : 7005;

const dev_dbConfig = {
    host: '47.108.218.17',
    user: 'root',
    port: '3306',
    password: 'whw@2023',
    database: 'zqyff',
    waitForConnections: true,
    connectionLimit: 10,
    queueLimit: 0,
  }
  // const dev_dbConfig = {
  //   host: '114.55.250.175',
  //   user: 'zqyff',
  //   password: 'whw@2024',
  //   database: 'zqyff',
  //   waitForConnections: true,
  //   connectionLimit: 50,
  //   queueLimit: 0,
  // }
// const pro_dbConfig = {
//     host: '127.0.0.1',
//     user: 'zqyff',
//     password: 'whw@2024',
//     database: 'zqyff',
//     waitForConnections: true,
//     connectionLimit: 50,
//     queueLimit: 0,
// }

//襄阳电厂配置
const pro_dbConfig = {
    host: 'rm-bp106f9oh04gin922.mysql.rds.aliyuncs.com',
    user: 'soft',
    port: '3306',
    password: 'Whw@2024',
    database: 'zqyff',
    waitForConnections: true,
    connectionLimit: 50,
    queueLimit: 0,
}

/**数据库配置 */
const dbConfig = isRelease ? pro_dbConfig : dev_dbConfig;
/**redis配置 */
//const redisConfig = isRelease ? 'redis://:ankuai@118.31.14.83:6379' : 'redis://:ankuai@118.31.14.83:6379';

// const dev_mqttConfig = {
//     host: '118.31.14.83',
//     port: 1883,
//     username: 'admin',
//     password: 'ankuai$888',
// }
// const pro_mqttConfig ={
//     host: '47.98.99.253',
//     port: 1883,
//     username: 'admin',
//     password: 'XdnTech@2023',
// }
//const mqttConfig = isRelease ? pro_mqttConfig : dev_mqttConfig;


export {
    isRelease, 
    serverPort, 
    dbConfig, 
    //redisConfig,
  //  mqttConfig

}